package 补充.多线程;//有问题
class SubThreadl extends Thread {
    public SubThreadl(String name) {
        super(name);
    }
    public void run() {
        for (int i = 0; i < 10; i++) {
            if (i % 2 != 0) {
                System.out.println(getName() + " " + i);
            }
        }
    }
}
public class 线程的优先级 {
    public static void main(String[] args) {
        SubThreadl st1 =new SubThreadl("优先级低的线程");
        SubThreadl st2 =new SubThreadl("优先级高的线程");
        st1.setPriority(Thread.MIN_PRIORITY);
        st2.setPriority(Thread.MAX_PRIORITY);
        st1.start();
        st2.start();
    }
}
